<template>
  <div>
    <SkyCardPanel title="开关">
      <div slot="main" class="containter-form">
        <sky-form :model="form" ref="SkyInlineForm">
          <div class="SkyFormRow">
            <sky-form-item label="默认开关" class="col_8">
              <sky-switch v-model="form.switchValue1"></sky-switch>
            </sky-form-item>
            <sky-form-item label="带文字开关" class="col_8">
              <sky-switch v-model="form.switchValue2" text="开|关"></sky-switch>
            </sky-form-item>
          </div>
        </sky-form>
      </div>
    </SkyCardPanel>

    <SkyHiddenPanel title="代码">
      <div class="prewrap" v-highlight>
        <!-- 使用指令 -->
        <pre>
          <code class="html">
             // 开关

             

                    &lt;sky-switch v-model="form.switchValue1"&gt;&lt;/sky-switch&gt;

                

                    &lt;sky-switch v-model="form.switchValue2" text="开|关"&gt;&lt;/sky-switch&gt;

                
              
          </code>
      </pre>
      </div>

      <div class="prewrap" v-highlight>
        <!-- 使用指令 -->
        <pre>
          <code class="javascript">
             // 开关
             
              export default {
                data () {
                  return {
                    form:{
                        switchValue1:0,
                        switchValue2:0
                    }
                  }
                }
              }
              
          </code>
      </pre>
      </div>
    </SkyHiddenPanel>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        form: {
          switchValue1: 0,
          switchValue2: 0
        }
      }
    }
  }
</script>

<style>
</style>